﻿#include "PhyscisPropRibbedWapper.h"
#include "FITK_Kernel/FITKAppFramework/FITKMessage.h"

Ribbed * PhyscisPropRibbedWapper::new_Ribbed()
{
    return new Ribbed;
}
void PhyscisPropRibbedWapper::delete_Ribbed(Ribbed * obj)
{
    if (obj) delete obj;
}

Ribbed * PhyscisPropRibbedWapper::static_Ribbed_GetRibbed(const QString & name)
{
    return new Ribbed(name);
}

QString PhyscisPropRibbedWapper::getName(Ribbed * obj)
{
    if (obj)
        return obj->getName();
    return QString();
}

void PhyscisPropRibbedWapper::setName(Ribbed * obj, const QString & name)
{
    if (!obj)return;
    bool ok = obj->setName(name);
    if (!ok) {
        AppFrame::FITKMessageError("Set Name failed !");
    }
}

void PhyscisPropRibbedWapper::setRibs_1(Ribbed * obj, const QString & beam, double spacing, double dev, double offset, double orientation)
{
    if (!obj)return;
    bool ok = obj->setRibs_1(beam, spacing, dev, offset, orientation);
    if (!ok) {
        AppFrame::FITKMessageError("Set Ribs_1 failed !");
    }
}

void PhyscisPropRibbedWapper::setRibs_2(Ribbed * obj, const QString & beam, double spacing, double dev, double offset, double orientation)
{
    if (!obj)return;
    bool ok = obj->setRibs_2(beam, spacing, dev, offset, orientation);
    if (!ok) {
        AppFrame::FITKMessageError("Set Ribs_2 failed !");
    }
}

void PhyscisPropRibbedWapper::disableRibs_2(Ribbed * obj)
{
    if (!obj)return;
    bool ok = obj->disableRibs_2();
    if (!ok) {
        AppFrame::FITKMessageError("Disable Ribs_2 failed !");
    }
}

void PhyscisPropRibbedWapper::setBaseAngle(Ribbed * obj, double angle)
{
    if (!obj)return;
    bool ok = obj->setBaseAngle(angle);
    if (!ok) {
        AppFrame::FITKMessageError("Set Base Angle failed !");
    }
}

void PhyscisPropRibbedWapper::setSkinSection(Ribbed * obj, const QString & skinName)
{
    if (!obj)return;
    bool ok = obj->setSkinSection(skinName);
    if (!ok) {
        AppFrame::FITKMessageError("Set Skin Section failed !");
    }
}

void PhyscisPropRibbedWapper::createPhyscisProp(Ribbed * obj, const QString & name)
{
    if (!obj)return;
    bool ok = obj->createPhyscisProp(name);
    if (!ok) {
        AppFrame::FITKMessageError("Create Physcis Property failed !");
    }
}

Ribbed::Ribbed(const QString & name) :
    Acoustics::PyFITKPhyscisPropRibbed(name)
{
}

Ribbed::Ribbed() :
    Acoustics::PyFITKPhyscisPropRibbed()
{
}
